package com.fc.v2.model.auto;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import cn.hutool.core.util.StrUtil;

/**
 * 专家项目映射 ExperprojectExample
 * @author Archie_自动生成
 * @date 2021-12-07 11:14:56
 */
public class ExperprojectExample {

    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ExperprojectExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }
        
				
        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(String value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(String value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(String value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(String value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(String value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(String value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLike(String value) {
            addCriterion("id like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotLike(String value) {
            addCriterion("id not like", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<String> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<String> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(String value1, String value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(String value1, String value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }
        
				
        public Criteria andExpertIdIsNull() {
            addCriterion("expert_id is null");
            return (Criteria) this;
        }

        public Criteria andExpertIdIsNotNull() {
            addCriterion("expert_id is not null");
            return (Criteria) this;
        }

        public Criteria andExpertIdEqualTo(String value) {
            addCriterion("expert_id =", value, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdNotEqualTo(String value) {
            addCriterion("expert_id <>", value, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdGreaterThan(String value) {
            addCriterion("expert_id >", value, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdGreaterThanOrEqualTo(String value) {
            addCriterion("expert_id >=", value, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdLessThan(String value) {
            addCriterion("expert_id <", value, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdLessThanOrEqualTo(String value) {
            addCriterion("expert_id <=", value, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdLike(String value) {
            addCriterion("expert_id like", value, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdNotLike(String value) {
            addCriterion("expert_id not like", value, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdIn(List<String> values) {
            addCriterion("expert_id in", values, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdNotIn(List<String> values) {
            addCriterion("expert_id not in", values, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdBetween(String value1, String value2) {
            addCriterion("expert_id between", value1, value2, "expertId");
            return (Criteria) this;
        }

        public Criteria andExpertIdNotBetween(String value1, String value2) {
            addCriterion("expert_id not between", value1, value2, "expertId");
            return (Criteria) this;
        }
        
				
        public Criteria andProIdIsNull() {
            addCriterion("pro_id is null");
            return (Criteria) this;
        }

        public Criteria andProIdIsNotNull() {
            addCriterion("pro_id is not null");
            return (Criteria) this;
        }

        public Criteria andProIdEqualTo(String value) {
            addCriterion("pro_id =", value, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdNotEqualTo(String value) {
            addCriterion("pro_id <>", value, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdGreaterThan(String value) {
            addCriterion("pro_id >", value, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdGreaterThanOrEqualTo(String value) {
            addCriterion("pro_id >=", value, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdLessThan(String value) {
            addCriterion("pro_id <", value, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdLessThanOrEqualTo(String value) {
            addCriterion("pro_id <=", value, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdLike(String value) {
            addCriterion("pro_id like", value, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdNotLike(String value) {
            addCriterion("pro_id not like", value, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdIn(List<String> values) {
            addCriterion("pro_id in", values, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdNotIn(List<String> values) {
            addCriterion("pro_id not in", values, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdBetween(String value1, String value2) {
            addCriterion("pro_id between", value1, value2, "proId");
            return (Criteria) this;
        }

        public Criteria andProIdNotBetween(String value1, String value2) {
            addCriterion("pro_id not between", value1, value2, "proId");
            return (Criteria) this;
        }
        
				
        public Criteria andCheckProcessIsNull() {
            addCriterion("check_process is null");
            return (Criteria) this;
        }

        public Criteria andCheckProcessIsNotNull() {
            addCriterion("check_process is not null");
            return (Criteria) this;
        }

        public Criteria andCheckProcessEqualTo(Integer value) {
            addCriterion("check_process =", value, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessNotEqualTo(Integer value) {
            addCriterion("check_process <>", value, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessGreaterThan(Integer value) {
            addCriterion("check_process >", value, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessGreaterThanOrEqualTo(Integer value) {
            addCriterion("check_process >=", value, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessLessThan(Integer value) {
            addCriterion("check_process <", value, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessLessThanOrEqualTo(Integer value) {
            addCriterion("check_process <=", value, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessLike(Integer value) {
            addCriterion("check_process like", value, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessNotLike(Integer value) {
            addCriterion("check_process not like", value, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessIn(List<Integer> values) {
            addCriterion("check_process in", values, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessNotIn(List<Integer> values) {
            addCriterion("check_process not in", values, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessBetween(Integer value1, Integer value2) {
            addCriterion("check_process between", value1, value2, "checkProcess");
            return (Criteria) this;
        }

        public Criteria andCheckProcessNotBetween(Integer value1, Integer value2) {
            addCriterion("check_process not between", value1, value2, "checkProcess");
            return (Criteria) this;
        }
        
				
        public Criteria andOther1IsNull() {
            addCriterion("other1 is null");
            return (Criteria) this;
        }

        public Criteria andOther1IsNotNull() {
            addCriterion("other1 is not null");
            return (Criteria) this;
        }

        public Criteria andOther1EqualTo(String value) {
            addCriterion("other1 =", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1NotEqualTo(String value) {
            addCriterion("other1 <>", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1GreaterThan(String value) {
            addCriterion("other1 >", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1GreaterThanOrEqualTo(String value) {
            addCriterion("other1 >=", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1LessThan(String value) {
            addCriterion("other1 <", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1LessThanOrEqualTo(String value) {
            addCriterion("other1 <=", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1Like(String value) {
            addCriterion("other1 like", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1NotLike(String value) {
            addCriterion("other1 not like", value, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1In(List<String> values) {
            addCriterion("other1 in", values, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1NotIn(List<String> values) {
            addCriterion("other1 not in", values, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1Between(String value1, String value2) {
            addCriterion("other1 between", value1, value2, "other1");
            return (Criteria) this;
        }

        public Criteria andOther1NotBetween(String value1, String value2) {
            addCriterion("other1 not between", value1, value2, "other1");
            return (Criteria) this;
        }
        
				
        public Criteria andOther2IsNull() {
            addCriterion("other2 is null");
            return (Criteria) this;
        }

        public Criteria andOther2IsNotNull() {
            addCriterion("other2 is not null");
            return (Criteria) this;
        }

        public Criteria andOther2EqualTo(String value) {
            addCriterion("other2 =", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2NotEqualTo(String value) {
            addCriterion("other2 <>", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2GreaterThan(String value) {
            addCriterion("other2 >", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2GreaterThanOrEqualTo(String value) {
            addCriterion("other2 >=", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2LessThan(String value) {
            addCriterion("other2 <", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2LessThanOrEqualTo(String value) {
            addCriterion("other2 <=", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2Like(String value) {
            addCriterion("other2 like", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2NotLike(String value) {
            addCriterion("other2 not like", value, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2In(List<String> values) {
            addCriterion("other2 in", values, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2NotIn(List<String> values) {
            addCriterion("other2 not in", values, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2Between(String value1, String value2) {
            addCriterion("other2 between", value1, value2, "other2");
            return (Criteria) this;
        }

        public Criteria andOther2NotBetween(String value1, String value2) {
            addCriterion("other2 not between", value1, value2, "other2");
            return (Criteria) this;
        }
        
				
        public Criteria andManUpdateTimeIsNull() {
            addCriterion("man_update_time is null");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeIsNotNull() {
            addCriterion("man_update_time is not null");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeEqualTo(Date value) {
            addCriterion("man_update_time =", value, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeNotEqualTo(Date value) {
            addCriterion("man_update_time <>", value, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeGreaterThan(Date value) {
            addCriterion("man_update_time >", value, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("man_update_time >=", value, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeLessThan(Date value) {
            addCriterion("man_update_time <", value, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeLessThanOrEqualTo(Date value) {
            addCriterion("man_update_time <=", value, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeLike(Date value) {
            addCriterion("man_update_time like", value, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeNotLike(Date value) {
            addCriterion("man_update_time not like", value, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeIn(List<Date> values) {
            addCriterion("man_update_time in", values, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeNotIn(List<Date> values) {
            addCriterion("man_update_time not in", values, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeBetween(Date value1, Date value2) {
            addCriterion("man_update_time between", value1, value2, "manUpdateTime");
            return (Criteria) this;
        }

        public Criteria andManUpdateTimeNotBetween(Date value1, Date value2) {
            addCriterion("man_update_time not between", value1, value2, "manUpdateTime");
            return (Criteria) this;
        }
        
			
		 public Criteria andLikeQuery(Experproject record) {
		 	List<String> list= new ArrayList<String>();
		 	List<String> list2= new ArrayList<String>();
        	StringBuffer buffer=new StringBuffer();
			if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			 list.add("ifnull(id,'')");
    		}
			if(record.getExpertId()!=null&&StrUtil.isNotEmpty(record.getExpertId().toString())) {
    			 list.add("ifnull(expert_id,'')");
    		}
			if(record.getProId()!=null&&StrUtil.isNotEmpty(record.getProId().toString())) {
    			 list.add("ifnull(pro_id,'')");
    		}
			if(record.getCheckProcess()!=null&&StrUtil.isNotEmpty(record.getCheckProcess().toString())) {
    			 list.add("ifnull(check_process,'')");
    		}
			if(record.getOther1()!=null&&StrUtil.isNotEmpty(record.getOther1().toString())) {
    			 list.add("ifnull(other1,'')");
    		}
			if(record.getOther2()!=null&&StrUtil.isNotEmpty(record.getOther2().toString())) {
    			 list.add("ifnull(other2,'')");
    		}
			if(record.getManUpdateTime()!=null&&StrUtil.isNotEmpty(record.getManUpdateTime().toString())) {
    			 list.add("ifnull(man_update_time,'')");
    		}
			if(record.getId()!=null&&StrUtil.isNotEmpty(record.getId().toString())) {
    			list2.add("'%"+record.getId()+"%'");
    		}
			if(record.getExpertId()!=null&&StrUtil.isNotEmpty(record.getExpertId().toString())) {
    			list2.add("'%"+record.getExpertId()+"%'");
    		}
			if(record.getProId()!=null&&StrUtil.isNotEmpty(record.getProId().toString())) {
    			list2.add("'%"+record.getProId()+"%'");
    		}
			if(record.getCheckProcess()!=null&&StrUtil.isNotEmpty(record.getCheckProcess().toString())) {
    			list2.add("'%"+record.getCheckProcess()+"%'");
    		}
			if(record.getOther1()!=null&&StrUtil.isNotEmpty(record.getOther1().toString())) {
    			list2.add("'%"+record.getOther1()+"%'");
    		}
			if(record.getOther2()!=null&&StrUtil.isNotEmpty(record.getOther2().toString())) {
    			list2.add("'%"+record.getOther2()+"%'");
    		}
			if(record.getManUpdateTime()!=null&&StrUtil.isNotEmpty(record.getManUpdateTime().toString())) {
    			list2.add("'%"+record.getManUpdateTime()+"%'");
    		}
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append(" like CONCAT(");
        	buffer.append(StrUtil.join(",",list2));
        	buffer.append(")");
        	if(!" CONCAT() like CONCAT()".equals(buffer.toString())) {
        		addCriterion(buffer.toString());
        	}
        	return (Criteria) this;
        }
        
        public Criteria andLikeQuery2(String searchText) {
		 	List<String> list= new ArrayList<String>();
        	StringBuffer buffer=new StringBuffer();
    		list.add("ifnull(id,'')");
    		list.add("ifnull(expert_id,'')");
    		list.add("ifnull(pro_id,'')");
    		list.add("ifnull(check_process,'')");
    		list.add("ifnull(other1,'')");
    		list.add("ifnull(other2,'')");
    		list.add("ifnull(man_update_time,'')");
        	buffer.append(" CONCAT(");
	        buffer.append(StrUtil.join(",",list));
        	buffer.append(")");
        	buffer.append("like '%");
        	buffer.append(searchText);
        	buffer.append("%'");
        	addCriterion(buffer.toString());
        	return (Criteria) this;
        }
        
}
	
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}